diff -c make-3.60/Makefile make-st/Makefile
*** make-3.60/Makefile	Sat May 25 02:53:38 1991
--- make-st/Makefile	Tue Jul 30 16:02:12 1991
***************
*** 19,26 ****
  #	Makefile for GNU Make
  #
  
! CFLAGS = $(defines) -g
! LDFLAGS = -g
  
  # Define nothing for BSD, USG for System V, and USGr3 (as well as USG) for
  # SVR3, HPUX for HP-UX (as well as USG or USGr3 as appropriate).  If you have a
--- 19,26 ----
  #	Makefile for GNU Make
  #
  
! CFLAGS = $(defines) -O
! LDFLAGS = -s
  
  # Define nothing for BSD, USG for System V, and USGr3 (as well as USG) for
  # SVR3, HPUX for HP-UX (as well as USG or USGr3 as appropriate).  If you have a
***************
*** 32,38 ****
  # If you want to avoid use of floating-point numbers, define NO_FLOAT.  If your
  # compiler can handle `enum' bitfields (and it's not GCC), define
  # ENUM_BITFIELDS.
! defines =
  
  # Define UMAX here to use Encore's inq_stats call.  Define UMAX_43 (and UMAX)
  # if you have UMAX 4.3 instead of UMAX 4.2.  If the load average is in a symbol
--- 32,38 ----
  # If you want to avoid use of floating-point numbers, define NO_FLOAT.  If your
  # compiler can handle `enum' bitfields (and it's not GCC), define
  # ENUM_BITFIELDS.
! defines = -DNO_FLOAT
  
  # Define UMAX here to use Encore's inq_stats call.  Define UMAX_43 (and UMAX)
  # if you have UMAX 4.3 instead of UMAX 4.2.  If the load average is in a symbol
***************
*** 43,49 ****
  # union, rather than a simple `n_name' member, define NLIST_NAME_UNION.  If the
  # `n_name' member of a `struct nlist' is an array that must be copied into,
  # define NLIST_NAME_ARRAY.  Otherwise, define NO_LDAV.
! LOAD_AVG =
  
  # If you don't want archive support, comment these out.
  ARCHIVES = arscan.o ar.o
--- 43,49 ----
  # union, rather than a simple `n_name' member, define NLIST_NAME_UNION.  If the
  # `n_name' member of a `struct nlist' is an array that must be copied into,
  # define NLIST_NAME_ARRAY.  Otherwise, define NO_LDAV.
! LOAD_AVG = -DNLIST_NAME_UNION -DNO_LDAV
  
  # If you don't want archive support, comment these out.
  ARCHIVES = arscan.o ar.o
***************
*** 108,113 ****
--- 108,117 ----
  make: $(objs)
  	$(CC) $(LDFLAGS) $(objs) $(LOADLIBES) -o make.new
  	mv -f make.new make
+ 
+ make.sym: $(objs)
+ 	/usr/gcc/bin/sym-ld.ttp -o x.sym /usr/gcc/lib/crt0.o $(objs) $(LOADLIBES) -lgnu
+ 	/usr/gcc/bin/gcc-ld.ttp -o x.ttp /usr/gcc/lib/crt0.o $(objs) $(LOADLIBES) -lgnu
  
  load.o: load.c
  	$(CC) $(CFLAGS) $(LOAD_AVG) -c load.c
diff -c make-3.60/arscan.c make-st/arscan.c
*** make-3.60/arscan.c	Thu Apr 11 18:01:14 1991
--- make-st/arscan.c	Tue Jul 30 16:05:26 1991
***************
*** 25,31 ****
--- 25,35 ----
  #define PORTAR 1
  #endif
  
+ #ifdef atarist
+ #include <gnu-ar.h>
+ #else
  #include <ar.h>
+ #endif
  #include <stdio.h>
  #include <sys/types.h>
  #include <sys/stat.h>
diff -c make-3.60/commands.c make-st/commands.c
*** make-3.60/commands.c	Wed Dec 26 18:12:02 1990
--- make-st/commands.c	Tue Jul 30 16:05:46 1991
***************
*** 341,346 ****
--- 341,347 ----
       int sig;
  {
    signal (sig, SIG_DFL);
+ #ifndef atarist
  #ifndef USG
    (void) sigsetmask (0);
  #endif
***************
*** 386,391 ****
--- 387,393 ----
      wait_for_children (0, 1);
  
    /* Delete any non-precious intermediate files that were made.  */
+ #endif /* atarist */
  
    remove_intermediates (1);
  
diff -c make-3.60/default.c make-st/default.c
*** make-3.60/default.c	Wed Jan 23 03:19:32 1991
--- make-st/default.c	Mon Aug  5 17:52:14 1991
***************
*** 28,36 ****
--- 28,41 ----
     `.s' must come last, so that a `.o' file will be made from
     a `.c' or `.p' or ... file rather than from a .s file.  */
  
+ #ifdef atarist
  static char default_suffixes[]
+   = ".out .a .o .c .cc .y .l .s .S .h .info .dvi .tex .texinfo .sh .elc .el";
+ #else
+ static char default_suffixes[]
    = ".out .a .ln .o .c .cc .p .f .F .r .y .l .s .S \
  .mod .sym .def .h .info .dvi .tex .texinfo .cweb .web .sh .elc .el";
+ #endif
  
  static struct pspec default_pattern_rules[] =
    {
***************
*** 53,58 ****
--- 58,67 ----
      "test -f $@ || $(CO) $(COFLAGS) $< $@",
      "%", "RCS/%,v",
      "test -f $@ || $(CO) $(COFLAGS) $< $@",
+ #ifdef atarist
+     "%", "rcs/%,v",
+     "test -f $@ || $(CO) $(COFLAGS) $< $@",
+ #endif
  
      /* SCCS.  */
      "%", "s.%",
diff -c make-3.60/function.c make-st/function.c
*** make-3.60/function.c	Thu Sep 13 17:53:56 1990
--- make-st/function.c	Tue Jul 30 16:05:52 1991
***************
*** 345,350 ****
--- 345,353 ----
  	else
  	  buf[0] = '\0';
  
+ #ifdef atarist
+ 	perror_with_name (buf, "function not allowed under TOS");
+ #else
  	if (pipe (pipedes) < 0)
  	  {
  	    perror_with_name (buf, "pipe");
***************
*** 438,443 ****
--- 441,447 ----
  
  	pop_signals_blocked_p ();
  
+ #endif /* atarist */
  	free (text);
  	break;
        }
diff -c make-3.60/job.c make-st/job.c
*** make-3.60/job.c	Wed May  8 14:47:02 1991
--- make-st/job.c	Tue Jul 30 16:05:38 1991
***************
*** 24,30 ****
--- 24,34 ----
  #include <errno.h>
  
  /* Default path to search for executables.  */
+ #ifdef atarist
+ static char default_path[] = ";/bin";
+ #else
  static char default_path[] = ":/bin:/usr/bin";
+ #endif
  
  /* Default shell to use.  */
  char default_shell[] = "/bin/sh";
***************
*** 83,92 ****
--- 87,106 ----
  
  #else	/* WTERMSIG not defined and have <sys/wait.h> or not USG.  */
  
+ #ifdef atarist
+ #  define WAIT_T int
+ #  define WTERMSIG(x) 0
+ #  define WCOREDUMP(x) 0
+ #  define WEXITSTATUS(x)  x
+ #  define WIFSIGNALED(x) (WTERMSIG (x) != 0)
+ #  define WIFEXITED(x) (WTERMSIG (x) == 0)
+ #  undef WAIT_NOHANG
+ #else
  #define WAIT_T union wait
  #define WTERMSIG(x)	((x).w_termsig)
  #define WCOREDUMP(x)	((x).w_coredump)
  #define WEXITSTATUS(x)	((x).w_retcode)
+ #endif /* atarist */
  #ifndef	WIFSIGNALED
  #define	WIFSIGNALED(x)	(WTERMSIG(x) != 0)
  #endif
***************
*** 204,210 ****
--- 218,226 ----
  #else	/* Not USG.  */
  
    /* Block the signals.  */
+ #ifndef atarist
    (void) sigblock (fatal_signal_mask | sigmask (SIGCHLD));
+ #endif /* atarist */
  
  #endif
  
***************
*** 225,231 ****
--- 241,249 ----
  #else	/* Not USG.  */
  
    /* Unblock the signals.  */
+ #ifndef atarist
    (void) sigsetmask (sigblock (0) & ~(fatal_signal_mask | sigmask (SIGCHLD)));
+ #endif
  
  #endif
  
***************
*** 687,692 ****
--- 705,711 ----
    
    /* Set up a bad standard input that reads from a broken pipe.  */
  
+ #ifndef atarist
    if (bad_stdin == -1)
      {
        /* Make a file descriptor that is the read end of a broken pipe.
***************
*** 700,705 ****
--- 719,725 ----
  	  bad_stdin = pd[0];
  	}
      }
+ #endif
  
    /* Decide whether to give this child the `good' standard input
       (one that points to the terminal or whatever), or the `bad' one
***************
*** 860,865 ****
--- 880,886 ----
    if (stdout_fd != 1)
      (void) dup2 (stdout_fd, 1);
  
+ #ifndef atarist
    /* Free up file descriptors.  */
    {
      register int d;
***************
*** 867,872 ****
--- 888,894 ----
      for (d = 3; d < max; ++d)
        (void) close (d);
    }
+ #endif /* atarist */
  
    /* Don't block signals for the new process.  */
    unblock_signals ();
***************
*** 892,897 ****
--- 914,964 ----
        return 1;
      }
    else
+ #ifdef atarist
+   {
+       static char  * * _extensions = 0,  * suff;
+       char         * p,  * q;
+       int   	     i;
+       
+       if ( _extensions == 0 )
+       {
+ 	  if ( ( p == (char*)getenv( "SUFF" ) ) != 0 && *p )
+ 	  {
+ 	      suff = (char*) xmalloc( strlen( p ) + 1 );
+ 	      strcpy( suff, p );
+ 	      for ( i = 1, q = suff;  *q;  q++ )
+ 		  if ( *q == ',' || *q == ';' )
+ 		      i++;
+ 	      _extensions = (char**) xmalloc( i * sizeof( char* ) );
+ 	      _extensions[0] = suff;
+ 	      for ( i = 0, q = suff;  *q;  q++ )
+ 		  if ( *q == ',' || *q == ';' )
+ 		  {
+ 		      *q = '\0';
+ 		      _extensions[ ++i ] = q + 1;
+ 		  }
+ 	      _extensions[ ++i ] = 0;
+ 	  }
+           else
+           {
+ 	      _extensions = (char**) xmalloc( 5 * sizeof( char* ) );
+ 	      _extensions[0] = "ttp";
+ 	      _extensions[1] = "tos";
+ 	      _extensions[2] = "prg";
+ 	      _extensions[3] = "app";
+ 	      _extensions[4] = 0;
+ 	  }
+       }
+       p = (char*) findfile( file, path, _extensions );
+       if ( p == NULL )
+ 	  return 0;
+       else
+       {
+ 	  strcpy( program, p );
+ 	  return 1;
+       }
+   }
+ #else
      {
        unsigned int len;
  
***************
*** 953,958 ****
--- 1020,1026 ----
      }
  
    return 0;
+ #endif /* atarist */
  }
  
  /* Replace the current process with one running the command in ARGV,
***************
*** 1020,1026 ****
  		  new_argv[1 + argc] = argv[argc];
  		  --argc;
  		}
- 
  	      execve (shell_path, new_argv, envp);
  	      perror_with_name ("execve: ", shell_path);
  	    }
--- 1088,1093 ----
***************
*** 1100,1106 ****
--- 1167,1177 ----
  	/* Not a special char.  */
  	switch (*p)
  	  {
+ #ifdef atarist
+ 	  case '@':
+ #else
  	  case '\\':
+ #endif
  	    if (p[1] != '\0' && p[1] != '\n')
  	      /* Copy and skip the following char.  */
  	      *ap++ = *++p;
***************
*** 1202,1208 ****
--- 1273,1283 ----
  	  if (*p == '\\' || *p == '\''
  	      || *p == ' ' || *p == '\t' || *p == '\n'
  	      || index (sh_chars, *p) != 0)
+ #ifdef atarist
+ 	    *ap++ = '@';
+ #else
  	    *ap++ = '\\';
+ #endif
  	  *ap++ = *p;
  	}
        *ap = '\0';
Only in make-st: job.c.orig
diff -c make-3.60/main.c make-st/main.c
*** make-3.60/main.c	Thu May 16 13:59:20 1991
--- make-st/main.c	Tue Jul 30 16:02:16 1991
***************
*** 292,297 ****
--- 292,301 ----
    struct dep *read_makefiles;
    char current_directory[MAXPATHLEN];
  
+ #ifdef atarist
+   _binmode( 0 );
+ #endif /* atarist */
+ 
    default_goal_file = 0;
    reading_filename = 0;
    reading_lineno_ptr = 0;
diff -c make-3.60/misc.c make-st/misc.c
*** make-3.60/misc.c	Wed Apr 24 20:52:06 1991
--- make-st/misc.c	Tue Jul 30 16:02:52 1991
***************
*** 464,469 ****
--- 464,470 ----
  static void
  init_access ()
  {
+ #ifndef atarist
    user_uid = getuid ();
    user_gid = getgid ();
  
***************
*** 473,478 ****
--- 474,480 ----
    /* Do these ever fail?  */
    if (user_uid == -1 || user_gid == -1 || make_uid == -1 || make_gid == -1)
      pfatal_with_name ("get{e}[gu]id");
+ #endif /* atarist */
  
    current_access = make;
  }
***************
*** 479,487 ****
--- 481,496 ----
  
  /* Give the process appropriate permissions for access to
     user data (i.e., to stat files, or to spawn a child process).  */
+ #ifdef atarist
  void
  user_access ()
  {
+   current_access = user;
+ }
+ #else
+ void
+ user_access ()
+ {
    if (!access_inited)
      init_access ();
  
***************
*** 520,525 ****
--- 529,535 ----
  
    current_access = user;
  }
+ #endif /* atarist */
  
  /* Give the process appropriate permissions for access to
     make data (i.e., the load average).  */
***************
*** 526,531 ****
--- 536,542 ----
  void
  make_access ()
  {
+ #ifndef atarist
    if (!access_inited)
      init_access ();
  
***************
*** 545,550 ****
--- 556,562 ----
    if (setregid (user_gid, make_gid) < 0)
      pfatal_with_name ("setregid");
  #endif
+ #endif /* atarist */
  
    current_access = make;
  }
